﻿using UnityEngine;
using System.Collections;

public class Omena : MonoBehaviour {
	
	
	void OnTriggerEnter2D(Collider2D collider)
	{
		print (collider.gameObject.tag);
		
		if(collider.gameObject.tag=="Player")
		{
			
			
			CoinController.coinCount=CoinController.coinCount+3;
			
			Destroy(this.gameObject);
			
			
			
			
		}
		
		
		
		
		
	}
}
